package com.example.javaee.service.impl;

import com.example.javaee.dao.UserOrderDao;
import com.example.javaee.entity.Order;
import com.example.javaee.entity.User;
import com.example.javaee.entity.UserOrder;
import com.example.javaee.service.UserOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName BookServiceImpl
 * @Description
 * @Author 杨理欢
 * @Date 2021/11/16 14:45
 * @Version V1.0
 */
@Service
public class UserOrderServiceImpl implements UserOrderService {
    @Autowired
    UserOrderDao userOrderDao;

    @Override
    public List<UserOrder> findAllUserOrder() {
        return userOrderDao.findAllUserOrder();
    }

    @Override
    public void updateOrder(Order order){
         userOrderDao.updateOrder(order);
    }

    @Override
    public void updateUser(User user) {
        userOrderDao.updateUser(user);
    }

    @Override
    public int deleteOrder(int orderId) {
      return   userOrderDao.deleteOrder(orderId);
    }

    @Override
    public List<Order> wxObligationOrder() {
        return userOrderDao.wxObligationOrder();
    }

    @Override
    public List<Order> wxToSendTheGoods() {
        return userOrderDao.wxToSendTheGoods();
    }

    @Override
    public List<Order> wxWaitForReceiving() {
        return userOrderDao.wxWaitForReceiving();
    }

    @Override
    public void updateOrderState(int orderId) {
        userOrderDao.updateOrderState(orderId);
    }

    @Override
    public List<Order> wxGetAllOrder() {
        return userOrderDao.wxGetAllOrder();
    }

    @Override
    public List<UserOrder> findOrder(int orderId) {
        return userOrderDao.findOrder(orderId);
    }


}
